#include<stdio.h>
#include<stdlib.h>
int main()
{
	int x,y,right=50,left=0,bottom=20,up=0;
	int b=1,r=1;
	int v_y=1,v_x=1;
	while(1)
	{
		b=b+v_x,r=r+v_y;
		system("cls");
		for(x=1;x<=b;x++)
		printf("\n");
	    for(y=1;y<=r;y++)
		printf(" ");
	 printf("o");
	 printf("\n");
	if((b==bottom)||(b==up))
		v_x=-1*v_x;
	    printf("\a");
	if((r==right)||(r==left))
		v_y=-1*v_y;
	}
	return 0;
}